1
Geometry of Optimization: From Lines to Convexity
MATH008 Lesson 2
00:00
The geometry of optimization is not merely about shapes; it is about the structural integrity of sets under interpolation. We begin with the most primitive path in space: the line.

The Algebraic Foundation: Lines and Affine Sets

To navigate a multi-dimensional optimization landscape, we must define how to move between two points $x_1$ and $x_2$. A mathematical line is the set of all points $y$ satisfying:

$$y = \theta x_1 + (1 - \theta)x_2$$

Equivalently, we can view this as starting at $x_2$ and moving in the direction $(x_1 - x_2)$ scaled by $\theta$: $y = x_2 + \theta(x_1 - x_2)$. When $\theta$ ranges over all real numbers $\mathbb{R}$, we generate an affine set. A crucial property to remember: Any line is affine. If it passes through zero, it is a subspace, hence also a convex cone.

The Line Segment (The Bridge)

A line segment is the restriction where $0 \le \theta \le 1$. Unlike the infinite line, a line segment is convex, but not affine (unless it reduces to a point). It represents the collection of all "weighted averages" or blends between two endpoints.

The Ray (The Direction)

A ray, which has the form $\{x_0 + \theta v \mid \theta \ge 0\}$, where $v \neq 0$, is also convex, but not affine. Rays are the foundational building blocks for cones in optimization theory.

The Convexity Litmus Test

We define a set $C$ as convex if the line segment connecting any two points in the set lies entirely within the set. This simple requirement—inclusion of the "bridge"—is what makes optimization problems tractable or insurmountable.

Example: Portfolio Optimization

In finance, suppose $x_1$ represents a portfolio of 100% stocks and $x_2$ is 100% bonds. The line segment represents all possible weighted blends. For instance, a 60/40 split occurs at $\theta = 0.6$. If the set of "allowable portfolios" is convex, then any mixture of two valid portfolios is guaranteed to be valid—a property that simplifies risk assessment immensely.

🎯 Core Principle
Convexity is defined not by the boundary of a set, but by its internal connectivity. If you can always travel in a straight line between any two points without leaving the set, you have a convex geometry.